@import '../../../styles/variables.less';
@import '../../../styles/mixin.less';

// 无活动信息
.order-pay {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    background-color: @grap-bg;

    >.user-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 134px;
        padding: 20px 0;
        box-sizing: border-box;

        >.header-img {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            border: 0.5px solid @default-border;
            object-fit: cover;
        }

        >.seller-info {
            display: flex;
            align-items: center;
            height: 22px;
            padding-top: 8px;

            >.name {
                max-width: 300px;
                font-size: 16px;
                font-weight: 500;
                line-height: 22px;
                color: @label-color;
            }
        }
    }

    .pay-content {
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        width: 100%;
        min-height: calc(100vh - 134px);
        background-color: @white;
        border-radius: 10px 10px 0 0;

        .input-section {
            box-sizing: border-box;
            margin: 0 20px;

            .label {
                display: flex;
                align-items: center;
                padding-top: 20px;
                line-height: 20px;
            }

            .input-box {
                height: 44px;
                margin-top: 12px;
            }
        }

        .content-box {
            position: relative;
            border-radius: 8px;
            flex: 1;

            .activity-info {
                margin: 8px 20px 0 4px;
            }

            .customize-box {
                margin: 32px 20px 0;
            }
        }
    }
}

// 有活动信息
.order-activity-pay {
    position: relative;
    right: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    background-color: #EDEDED;

    .bg-img {
        position: relative;
        right: 0;
        left: 0;
        width: 100%;

        .poster {
            object-fit: cover;
        }

        .mask-area {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 122px;
            background: linear-gradient(180deg, rgba(237, 237, 237, 0) 0%, #EDEDED 100%);
        }

        .header-box {
            position: absolute;
            bottom: 54px;
            display: flex;
            align-items: flex-end;
            padding: 0 16px;
            width: 100%;
            box-sizing: border-box;

            .icon-avatar {
                width: 52px;
                height: 52px;
                margin-right: 8px;
                background-color: @default-bg;
                border-radius: 10px;
                object-fit: cover;
            }

            .name {
                max-width: calc('100% - 60px');
                font-size: 16px;
                font-weight: 500;
                line-height: 22px;
                color: @label-color;
            }
        }
    }

    .content-box {
        position: relative;
        z-index: 2;
        top: -42px;

        .activity-box {
            box-sizing: border-box;
            width: 343px;
            padding-left: 16px;
            margin: 0 16px;
            background-color: @white;
            border-radius: 10px;

            .label {
                padding: 16px 16px 8px 0;
                font-size: 14px;
                font-weight: 500;
                line-height: 20px;
                color: @label-color;
                word-break: break-all;
                white-space: pre-wrap;
            }

            .img-list {
                display: flex;
                flex-wrap: wrap;

                .img-box {
                    display: flex;
                    align-items: center;
                    width: 120px;
                    height: 120px;
                    margin: 0 8px 8px 0;
                    background-color: @grap-bg;
                    border-radius: 8px;

                    .icon-poster {
                        width: 120px;
                        height: 120px;
                        border-radius: 8px;
                        object-fit: cover;
                    }
                }

                .small-img-box {
                    width: 72px;
                    height: 72px;

                    .icon-poster {
                        width: 72px;
                        height: 72px;
                    }
                }

                .middle-img-box {
                    width: 98px;
                    height: 98px;

                    .icon-poster {
                        width: 98px;
                        height: 98px;
                    }
                }
            }
        }

        .customize-box {
            background-color: #EDEDED;

            .cell-item {
                background-color: @white;
            }
        }
    }

    .footer-box {
        background: linear-gradient(180deg, rgba(237, 237, 237, 0) 0%, #EDEDED 30%);

        .price-box {
            width: 100%;
            height: 40px;
            line-height: 40px;
            margin: 24px 0 -8px;
            text-align: center;
        }

        .key-confirm {
            width: 184px;
            height: 40px;
            border-radius: 8px;
        }
    }
}

.activity-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 38px;
    padding: 0 16px;
    margin: 4px 0 0 -16px;
    background: linear-gradient(90deg, rgba(241, 176, 0, 0) 0%, rgba(241, 176, 0, 0.12) 100%);
    border: 2px solid @white;
    border-radius: 10px;

    .left-box,
    .right-box {
        display: flex;
        align-items: center;
        font-size: 12px;
        height: 20px;
        line-height: 22px;
        color: @orange;
    }

    .left-box {
        margin-left: -2px;

        .buyer-img {
            margin-top: -2px;
            position: relative;
            width: 20px;
            height: 20px;
            border: 2px solid @white;
            border-radius: 50%;
        }

        >.time {
            margin-left: 4px;
        }
    }
}

.customize-box {
    margin: 32px 16px 0;
    background-color: @white;
    padding-bottom: 136px;

    .label {
        margin-bottom: 8px;
        font-size: 14px;
        line-height: 20px;
        color: @content-color;
    }

    .cell-item {
        box-sizing: border-box;
        min-height: 67px;
        max-height: 88px;
        padding: 12px 16px;
        margin-bottom: 8px;
        background-color: @grap-bg;
        border: 0.5px solid @white;
        border-radius: 10px;


        .cell-label {
            margin-bottom: 6px;
            font-size: 12px;
            line-height: 17px;
            color: @label-color;
        }

        .cell-input {
            min-height: 20px;
            max-height: 40px;
            padding: 0;
            font-size: 14px;
            font-weight: 500;
            line-height: 20px;
            background-color: transparent;

            :deep(.van-field__control) {
                font-weight: 500;
            }
        }
    }

    // 无活动时
    .cell-item-active-no {
        animation: no-blink 1s infinite;
    }

    // 有活动时
    .cell-item-active {
        animation: blink 1s infinite;
    }

}

.only-remark {
    margin: 12px 16px 0 16px;
}

.remark-box {
    font-size: 14px;
    line-height: 20px;
    color: #1a1a1a;
    word-break: break-all;

    .add-remark {
        color: @blue;
    }
}

.footer-box {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 20%);
    user-select: none;
    padding: 0 16px;
    .safe-area-padding-bottom();

    .key-confirm {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 52px;
        font-size: 17px;
        font-weight: 500;
        color: @white;
        border-radius: 10px;
        background-color: @primary-color;
        margin: 24px 0;

        &:active {
            opacity: 0.6;
        }
    }
}

// 无活动的闪动
@keyframes no-blink {

    0%,
    100% {
        background: @grap-bg;
    }

    50% {
        background: linear-gradient(0deg, rgba(0, 122, 255, 0.12) 0%, rgba(0, 122, 255, 0.12) 100%), #fff;
        border: 0.5px solid rgba(0, 122, 255, 0.4);
    }
}

// 有活动的闪动
@keyframes blink {

    0%,
    100% {
        background: @white;
    }

    50% {
        background: linear-gradient(0deg, rgba(0, 122, 255, 0.12) 0%, rgba(0, 122, 255, 0.12) 100%), #fff;
        border: 0.5px solid rgba(0, 122, 255, 0.4);
    }
}